<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<form method="get" action="/list">
    <p>
        关键词：<input type="text" name="keyWord"/><input type="submit" value="查询"/>
    </p>
</form>
<table>
    <tr>
        <th>关键词</th>
        <th>搜索指数</th>
        <th>创建时间</th>
    </tr>
    <tr th:each="hotevent:${pageUtil.data}">
        <td th:text="${hotevent.keyWord}"></td>
        <td th:text="${hotevent.searchSum}"></td>
        <td th:text="${#dates.format(hotevent.createDate,'yyyy-MM-dd')}"></td>
    </tr>
    <p>
        <a href="/list?pageIndex=1">首页</a>
        <a th:href="@{/list(pageIndex=${(pageUtil.pageIndex)-1 gt 0?(pageUtil.pageIndex)-1:1})}">上一页</a>
        <a th:href="@{/list(pageIndex=${(pageUtil.pageIndex)+1 lt (pageUtil.totalPageCount)?(pageUtil.pageIndex)+1:(pageUtil.totalPageCount)})}">下一页</a>
        <a th:href="@{/list(pageIndex=${pageUtil.totalPageCount})}">尾页</a>
    </p>
</table>
</body>
</html>